package com.pipayshop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pipayshop.domain.Sku;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author xiaoqiu
 * @date 2024/9/27 16:02
 * @description
 */
@Mapper
public interface OnlineStoreSkuMapper extends BaseMapper<Sku> {

    int reduceStock(@Param("num") Integer num,@Param("skuId") Integer skuId);

    List<Sku> selectAll(String commodityId);

    List<Sku> selectByCommodityIdAndSkuId(@Param("commodityIds") List<String> commodityIds,@Param("skuIds") List<Integer> skuIds);
}
